
const baseUrl='https://open.zhimulp.online'
export function request(param) {
	// uni.showLoading({
	// 	title: '加载中',
	// 	mask:true
	// });
 	return new Promise((resolve, reject) => {
 		const data = param.data || {}
 		uni.request({
 			url: baseUrl + '/jump'  + param.url,
 			method: param.method || 'POST',
 			timeout: param.timeout || 30000,
 			header: {
 				'content-type': 'application/json',
 				Authorization: uni.getStorageSync('token') || '85300496-2065-444b-b019-5f6c9ab57644'
 			},
 			data: {

 				...data
 			},
 			success: res => {
				// 请求成功
				resolve(res.data)
 			},
 			fail: res => {
 				// uni.showToast('网络似乎出现了问题，请重试')
 				reject(res)
 			},
 			complete: () => {
				// uni.hideLoading();
 			}
 		})
 	})
 }
